﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using MyLib;

namespace WebPortal.YWYY
{
    public partial class SelectTB : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        //查询
        protected void Button1_Click(object sender, EventArgs e)
        {
            string department = tianname.Text.ToString().Trim();//提案名称

            StringBuilder sb = new StringBuilder();
            sb.AppendFormat(@"select tianname, tiansummary, diaochaff, diaochaqk, ziliaozl,tianrenname||'('||tianrencode||')' username from proc_fwdy_tibaoshenqing t where t.tianname like '%{0}%'", department);

            DataTable dt = DataAccess.Instance("BizDB").ExecuteDataTable(sb.ToString());
            if (dt == null || dt.Rows.Count == 0)
            {
                Response.Write("<script type='text/javascript'>alert('此提案没有查询出历史记录，可以新建提案！');</script>");
            }
            RepeaterItemInfo.DataSource = dt;
            RepeaterItemInfo.DataBind();

        }
    }
}